<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>边框流光效果</title>
    <style>
        .glowing-border {
            width: 200px;
            height: 200px;
            margin: 50px;
            position: relative;
            background-color: #333;
            border: 2px solid #00ff00;
            border-radius: 5px;
            animation: glow 1s ease-in-out infinite alternate;
        }

        .glowing-border::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            z-index: -1;
            background: inherit;
            border-radius: inherit;
            filter: blur(10px);
        }

        @keyframes glow {
            from {
                box-shadow: 0 0 10px #00ff00;
            }

            to {
                box-shadow: 0 0 20px #00ff00;
            }
        }

        @keyframes glowing {
            0% {
                background-position: 0 0;
            }

            50% {
                background-position: 400% 0;
            }

            100% {
                background-position: 0 0;
            }
        }

        .element {
            background-image: linear-gradient(45deg, #ff00ff, #00ffff);
            background-size: 400% 400%;
            animation: glowing 5s linear infinite;
        }
    </style>
</head>

<body>
    <div>
        <div class="element">23</div>
    </div>
</body>

</html>